<template>
<div style="width: 1600px" >
	<el-space  wrap v-for="item in state.cateList">
		<div style="width: 380px;margin-right: 20px">
			<init-order-item type="rating" :cate-name="item.cateName"  :item-list="item.items"></init-order-item>
		</div>
	</el-space>
</div>
</template>

<script setup lang="ts">
import { ElLoading } from 'element-plus'

import InitOrderItem from '~/components/order/initOrderItem.vue'
const  state = reactive({
	cateList:[]
})
function init() {
	const loading = ElLoading.service({
		lock: true,
		text: 'Loading',
		background: 'rgba(0, 0, 0, 0.7)',
	})
	http.get("item/cateView").then(res =>{
		console.log(res)
		state.cateList = res.data
	})
	loading.close()
}

onMounted(() =>{
	init()
})
</script>

<style scoped>

</style>
